import java.io.File;
import java.io.IOException;

public class Test03 {
    public static void main(String[] args) throws IOException {
        File f1=new File("C:/Users/sun/Desktop/test.txt");
        System.out.println(f1.createNewFile());  // file
        File f2=new File("C:/Users/sun/Desktop/test");
        System.out.println(f2.mkdir());  // one directory
        File f3=new File("C:/Users/sun/Desktop/test/aaa/bbb");
        System.out.println(f3.mkdirs()); // multistage directory
        System.out.println(f1.delete()); // 只能删除文件及空目录
    }
}
